/**Author:7rATM Team
 * Date:May 2009
 * Description:Servlet that use for ATM users' to delect choser.
 */


import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.*;


import AtmSystem.*;

public class  DelectChoser extends HttpServlet {

    public void doPost(
        HttpServletRequest request,
        HttpServletResponse response)
    throws ServletException, IOException 
	{

        response.setContentType("text/html;charset=UTF-8");
        HttpSession session = request.getSession(true);
        Client myClient = (Client)session.getAttribute("client");

        /**if the number equals 1 and the user is exist
         * response with27.html
         * else let the user delect a new account.
         */
		if (myClient.getBankAccountDB().getNumbers()==1)
		{
			response.sendRedirect("/AtmSystem/27.html");
		}
		else {
			response.sendRedirect("/AtmSystem/23b.jsp");
		}
		
			
		
			return;
		}
			
		}
